#if !defined(AFX_MARC21EXPORTACION_H__68507013_30CB_4A94_B8D1_FDD8955B42ED__INCLUDED_)
#define AFX_MARC21EXPORTACION_H__68507013_30CB_4A94_B8D1_FDD8955B42ED__INCLUDED_

#include "isis.h"	// Added by ClassView
#include "MyIsisMarcZ.h"
#include "MispropiedadesPagina.h"
#include <yaz/marcdisp.h>

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// MARC21Exportacion.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// MARC21Exportacion dialog

class MARC21Exportacion : public CDialog
{
// Construction

public:
	CString GetLastExportOperator();
	CString GetLastExportTag();
	CString m_LastExportTag;
	void SetComboOptions();
	void UpdateFileLabel();
	CString ArchivoDestino;
	void creaZip();
	CString ObtieneHoyISO();
	void GuardarenCip(CString);
	void ObtenerUltimaExportacion();
	CString Registro;
	CString Directorio;
	CString Leader;
	CFile archivomarc;
	CMyIsisMarcZ cmt;
	CMyIsisMarcZ mibase;
	CIsismarcView* vistaduenia;
	CArray <traduccion,traduccion &> tablagizmo;
	CMispropiedadesPagina* mispaginas;
	MARC21Exportacion(CWnd* pParent = NULL);   // standard constructor
	void AsignaView (CView* vista);

// Dialog Data
	//{{AFX_DATA(MARC21Exportacion)
	enum { IDD = IDD_DIALOGOEXPMARC };
	CButton	m_ControlDiacriticas;
	CButton	m_LeyendaOK;
	CButton	m_LeyendaCancel;
	CStatic	m_LeyendaMARC21Progress;
	CButton	m_LeyendaLimitsMFN;
	CButton	m_LeyendaLimitsDate;
	CStatic	m_LeyendaMFNTo;
	CStatic	m_LeyendaMFNfrom;
	CStatic	m_Leyenda19;
	CStatic	m_Leyenda09;
	CStatic	m_Leyenda08;
	CStatic	m_FromField;
	CStatic	m_FromDate;
	CComboBox	m_Combo19Leader;
	CComboBox	m_ComboOperador;
	CComboBox	m_ComboOptions;
	CEdit	m_UltimaFecha;
	CEdit	m_MFNTo;
	CEdit	m_MFNFrom;
	CComboBox	m_Combo09Leader;
	CComboBox	m_Combo08Leader;
	CStatic	m_LeyendaResul;
	CStatic	m_LeyendaTipo;
	CProgressCtrl	m_Progreso;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(MARC21Exportacion)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void Zip(LPCTSTR lpszZipArchive, LPCTSTR lpszSrcFile);
	// Generated message map functions
	//{{AFX_MSG(MARC21Exportacion)
	afx_msg void OnAceptaExportacion();
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonFile();
	afx_msg void OnCheck2();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	
private:
	CString OperacionReemplazo(CString,CString,CString);
	void LoadDiacriticas();
	void GeneraLeader();
	CString EncodeToUTF8(LPCTSTR);

	void RetornaRegistro();
	void GeneraMARC21(yaz_marc_t);	
	CString FixField(CString, BOOL, CString);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MARC21EXPORTACION_H__68507013_30CB_4A94_B8D1_FDD8955B42ED__INCLUDED_)
